package xyz.zdsoft.project_group_manage_module.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import xyz.zdsoft.project_group_manage_module.entity.MyDto.RespPageBean;
import xyz.zdsoft.project_group_manage_module.entity.MyDto.TeamGch;
import xyz.zdsoft.project_group_manage_module.mapper.TermSelTeamMapper;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@Service
public class TermSelTeamGService {
    @Resource
    private TermSelTeamMapper termSelTeamMapper;

    public RespPageBean SelTeamStudent(Integer currentPage,Integer size,String teamName,String studentName,String userNo){
        //开启分页
        Page<TeamGch> page=new Page<>(currentPage,size);
        IPage<TeamGch> teamStudentPage = termSelTeamMapper.TermSelStudentInTeam(page,teamName,studentName,userNo);
        return new RespPageBean(teamStudentPage.getTotal(),teamStudentPage.getRecords());

    }
    public List<HashMap<String,Object>> TermSelTeam(HashMap<String,Object> map){
        return termSelTeamMapper.TermSelTeam(map);

    }
}
